import { request } from 'ice';

export default {
  getNav: async () => {
    return await request({
      url: '/api/sys/menu/nav',
      method: 'GET',
    });
  },
  getList: async () => {
    return await request({
      url: '/api/sys/menu/list',
      method: 'GET',
    });
  },
  getInfo: async (menuId) => {
    return await request({
      url: `/api/sys/menu/info/${menuId}`,
      method: 'GET',
    });
  },
  saveInfo: async (data) => {
    return await request({
      url: '/api/sys/menu/save',
      method: 'POST',
      data,
    });
  },
  updateInfo: async (data) => {
    return await request({
      url: '/api/sys/menu/update',
      method: 'POST',
      data,
    });
  },
  delOne: async (menuId) => {
    return await request({
      url: `/api/sys/menu/delete/${menuId}`,
      method: 'POST',
    });
  },
};
